/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase2203 - ForIn1
 * <p>Powered by webrx On 2022-07-14 14:31:47
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class ForIn1 {
    public static void main(String[] args) {
        //声明数组对象，初始化元素的个数 4
        String[] ss = {"李四", "王五", "jack", "张三", "100"};
        //.length是一个属性，返回数组元素的个数，此元素是对象，
        //System.out.println(ss.length);
        //System.out.println(ss[1]);
        //System.out.println(Arrays.toString(ss));
        ////for in for each
        //for(String s : ss){
        //    System.out.println(s);
        //}
        //
        //for(int i=0;i<ss.length;i++){
        //    System.out.println(ss[i]);
        //}

        for (int i = ss.length-1; i >= 0; i--) {
            System.out.println(ss[i]);
        }

        int[] nn = {10,20,10};
        for(int t : nn){
            System.out.println(t);
        }

    }
}
